Skip to content

Added collapsible sidepanels for PlotWindow - #13896

Merged
eilskra merged 3 commits into
equinor:mainfrom
eilskra:create-plot-widget-files
Jul 8, 2026
Merged

Added collapsible sidepanels for PlotWindow#13896
eilskra merged 3 commits into
equinor:mainfrom
eilskra:create-plot-widget-files

Conversation

@eilskra

@eilskra eilskra commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Issue
Resolves #11083
Part of #13883
Resolves #11066
Resolves #

Approach
Moved sidepanels from QDockWidget to QSplitter to avoid duplication error, making QDocketWidget not necessary.
Now have collapsible sidepanels

Moved plot options in their own respective widgets

https://github.com/user-attachments/assets/84375799-fbd1-4ea4-b983-22dc04e96893
Screenshot 2026-06-25 at 15 55 33

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'just rapid-tests')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Add backport label to latest release (format: 'backport release-branch-name')

@eilskra eilskra self-assigned this Jun 26, 2026
@eilskra eilskra added the improvement Something nice to have, that will make life easier for developers or users or both. label Jun 26, 2026
@eilskra
eilskra force-pushed the create-plot-widget-files branch 2 times, most recently from 44769ce to bc16cea Compare June 26, 2026 09:55
@eilskra eilskra changed the title Improve plot window Added collapsible sidepanels for PlotWindow Jun 26, 2026
@eilskra
eilskra force-pushed the create-plot-widget-files branch from bc16cea to 40d7872 Compare June 26, 2026 10:09
@codecov-commenter

codecov-commenter commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.36%. Comparing base (64bb156) to head (7e5b85a).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13896      +/-   ##
==========================================
+ Coverage   91.34%   91.36%   +0.01%     
==========================================
  Files         477      481       +4     
  Lines       34062    34112      +50     
==========================================
+ Hits        31115    31166      +51     
+ Misses       2947     2946       -1     
Flag Coverage Δ
cli-tests 35.91% <0.00%> (-0.06%) ⬇️
fuzz 43.57% <36.11%> (+0.04%) ⬆️
gui-tests 59.28% <96.29%> (+0.08%) ⬆️
performance-and-unit-tests 79.39% <100.00%> (+0.01%) ⬆️
test 46.07% <36.11%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/ert/gui/plotting/plot_window.py 77.49% <100.00%> (-1.87%) ⬇️
src/ert/gui/plotting/utils/qt_creator.py 100.00% <100.00%> (ø)
...ert/gui/plotting/widgets/plot_controls/__init__.py 100.00% <100.00%> (ø)
...ets/plot_controls/everest_controls_plot_options.py 100.00% <100.00%> (ø)
.../plotting/widgets/plot_controls/misfits_options.py 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

@codspeed-hq

codspeed-hq Bot commented Jun 26, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 36 untouched benchmarks


Comparing eilskra:create-plot-widget-files (7e5b85a) with main (64bb156)

Open in CodSpeed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the PlotWindow GUI layout to replace dock-based side panels with splitter-based side panels, and extracts plot-control UI elements into dedicated widgets/utilities to reduce duplication and avoid the QDockWidget-related duplication/undocking issues.

Changes:

  • Replaced QDockWidget side panels in PlotWindow with a QSplitter + reusable side-panel helpers.
  • Extracted Everest controls plot options and misfits plot options into dedicated widget classes under widgets/plot_controls/.
  • Added Qt UI utility helpers (qt_creator.py) and new unit tests for the extracted widgets/utilities.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/ert/gui/plotting/plot_window.py Switches layout to QSplitter side panels and wires in extracted plot-control widgets.
src/ert/gui/plotting/utils/qt_creator.py Adds shared UI helpers for side panels and group-box/layout creation.
src/ert/gui/plotting/widgets/plot_controls/misfits_options.py New misfits options widget wrapper exposing checkbox state.
src/ert/gui/plotting/widgets/plot_controls/everest_controls_plot_options.py New Everest controls plot options widget wrapper for x-axis selection.
src/ert/gui/plotting/widgets/plot_controls/__init__.py Exposes the new plot-control widgets as a small public module surface.
tests/ert/unit_tests/gui/plotting/widgets/test_misfits_options.py Adds unit tests for MisfitsOptions defaults, state updates, and callback triggering.
tests/ert/unit_tests/gui/plotting/widgets/test_everest_controls_plot_options.py Adds unit tests for EverestControlsPlotOptions defaults and callback triggering.
tests/ert/unit_tests/gui/plotting/utils/test_qt_creator.py Adds unit tests for the new Qt creator helpers.

Comment on lines +14 to +25
self._toggle_mean = QCheckBox("Show mean")
self._toggle_mean.setChecked(True)
self._toggle_mean.stateChanged.connect(connection_point)
self._toggle_outliers = QCheckBox("Show outliers")
self._toggle_outliers.setChecked(True)
self._toggle_outliers.stateChanged.connect(connection_point)
self._toggle_scatter_plot = QCheckBox("Show scatter")
self._toggle_scatter_plot.setChecked(False)
self._toggle_scatter_plot.stateChanged.connect(connection_point)
self._toggle_box = QCheckBox("Show box plot")
self._toggle_box.setChecked(True)
self._toggle_box.stateChanged.connect(connection_point)
Comment on lines +20 to +23
self._display_over_button_group = QButtonGroup()
self._display_over_button_group.addButton(self._display_over_batches_radio)
self._display_over_button_group.addButton(self._display_over_controls_radio)
self._display_over_button_group.buttonClicked.connect(connection_point)
Comment thread tests/ert/unit_tests/gui/plotting/utils/test_qt_creator.py
@eilskra
eilskra force-pushed the create-plot-widget-files branch 3 times, most recently from d34f3a7 to 7a457ed Compare June 26, 2026 15:08

@berland berland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Can the copilot comments be ignored?

@eilskra

eilskra commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Looks good to me. Can the copilot comments be ignored?

Ignored similar comment in regarding the layer in previous PR

@eilskra

eilskra commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Blocked until #13843 is merged

@eilskra

This comment was marked as outdated.

@eilskra
eilskra removed the request for review from berland July 1, 2026 13:54

This comment was marked as outdated.

@eilskra
eilskra force-pushed the create-plot-widget-files branch 2 times, most recently from 569def0 to 7a457ed Compare July 8, 2026 08:08
eilskra added 3 commits July 8, 2026 10:43
Also started the move of the util
create_box and create_layout
Not using the functionality of QDockWidget
Now uses splitter instead, allows user to collapse sidepanels

Note: tests for this feature was added to last commit
Similar to MisfitsOptions, also improved imports
@eilskra
eilskra force-pushed the create-plot-widget-files branch from 7a457ed to 7e5b85a Compare July 8, 2026 08:43
@ertomatic

Copy link
Copy Markdown
Collaborator

Screenshots differ from baselines. A baseline update PR has been prepared: equinor/ert-testdata#43

eilskra pushed a commit to equinor/ert-testdata that referenced this pull request Jul 8, 2026
@eilskra
eilskra merged commit 2a34262 into equinor:main Jul 8, 2026
66 of 67 checks passed
@eilskra
eilskra deleted the create-plot-widget-files branch July 8, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked improvement Something nice to have, that will make life easier for developers or users or both.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace QDockWidget with something else Gui sections doesn't disappear when changing gui menu

5 participants